
package com.wyzz.hr.base.action;

import java.util.ArrayList;
import java.util.List;

import com.wyzz.hr.base.BaseAction;
import com.wyzz.hr.bo.IDepartmentBO;
import com.wyzz.hr.bo.IPositionBaseBo;
import com.wyzz.hr.spring.SpringBeanFactory;

public class DWROrgSelector extends BaseAction {

	public DWROrgSelector() {
	}

	public List getOrgTreeList(String isShowDisable, String isShowPb) {
		List nodeList = new ArrayList();
		Integer status = Integer.valueOf(0);
		if ("show".equals(isShowDisable))
			status = Integer.valueOf(1);
		IDepartmentBO deptBo = (IDepartmentBO) SpringBeanFactory
				.getBean("departmentBO");
		List activeDepts = deptBo
				.setDeptOfNodeList(nodeList, status.intValue());
		if ("show".equals(isShowPb)) {
			IPositionBaseBo pbBo = (IPositionBaseBo) SpringBeanFactory
					.getBean("positionBaseBo");
			pbBo.setPbOfNodeList(activeDepts, nodeList, status.intValue());
		}
		return nodeList;
	}

	private static final long serialVersionUID = 1L;
}
